<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script>
function Person(name, age){
    this.name = name;
    this.age = age;
    console.log(Person.prototype.eat)
    if (!Person.prototype.eat){
        Person.prototype.eat = function (){
            console.log("吃" + this.name);
        }
    }
    if (!Person.prototype.speak){
        Person.prototype.speak = function (){
            console.log("说话");
        }
    }

}
var p1 = new Person("a", 20);
var p2 = new Person("b", 30);
console.log(p1.eat == p2.eat);
p1.eat()

</script>
</body>
</html>
<!--

0 "" undefined null NaN false  可以作为false使用. 其余全部是true



-->